% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shapefile_xyz.R
\name{shapefile2latlon}
\alias{shapefile2latlon}
\alias{latlon_from_shapefile}
\title{Convert shapefile (class sf) of points to data.table of lat, lon columns}
\usage{
shapefile2latlon(shp, include_only_latlon = TRUE)
}
\arguments{
\item{shp}{shapefile that is class sf, as from \code{\link[=shapefile_from_any]{shapefile_from_any()}}
or \code{\link[sf:st_read]{sf::st_read()}}, with geometry column that has points
so is class sfc_POINT}

\item{include_only_latlon}{set to FALSE to have function return
lat lon columns plus all of columns in shp. If TRUE, just returns
lat lon columns.}
}
\value{
data.table with columns named lat and lon,
and optionally all from shp as well,
as can be used as input to \code{\link[=ejamit]{ejamit()}}, \code{\link[=mapfast]{mapfast()}}, etc.
}
\description{
Makes lat and lon columns, from a sfc_POINT class geometry field,
via \code{\link[sf:st_coordinates]{sf::st_coordinates()}}
}
